<template>
    <div class="navback">
        <van-nav-bar
  :title="title"
  left-text="返回"
  :right-text="rightText"
  left-arrow
  @click-left="back"
  @click-right="clickRightBtn"
  
 
/>
    </div>
</template>

<script>
    export default {
        name:"Navback",
        props:{
            //上面的title该传什么类型的数据
            type:String,
            //默认是标题 或者为空
            default:"",
          title:{
            
          },
          //右侧文本内容
          rightText:{
            type:String,
            default:""
          }
        },
        methods:{
            //默认返回上一级
            back(){
                this.$router.back();
            },
            //点击右侧按钮
            clickRightBtn(){
                this.$emit("clickright");

            }
        }
    }
</script>

<style lang="less" scoped>
  @color:"#0c34BA";
  .navback{
    /deep/ .van-nav-bar .van-icon{
        color: @color;
    }
    /deep/ .van-nav-bar__text{
        color: @color;
    }
  }
</style>